package com.itfreer.xjmh.security;

import com.itfreer.bpm.api.BpmBaseRestService;
import com.itfreer.utils.ResponseEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.itfreer.bpm.api.BaseWorkFlowService;

import io.swagger.annotations.Api;

import com.itfreer.xjmh.security.entity.SecurityEquipmentEntity;

import java.util.List;
import java.util.Map;

/**
 * 定义安保设备Rest服务接口
 */
@RestController
@RequestMapping("/securityequipment")
@Api("安保设备")
public class RestSecurityEquipmentService extends BpmBaseRestService<SecurityEquipmentEntity> {
	
	@Autowired(required = false)
	private SecurityEquipmentService service;

	@Override
	protected BaseWorkFlowService<SecurityEquipmentEntity> getWorkFlowService() {
		return service;
	}

	@ApiOperation("统计图展示数据")
	@PostMapping({"/getAllData"})
	public ResponseEntity<List<Map<String, Object>>> getAllData(@RequestBody String input) {
		return service.getAllData();
	}
}
